package ThreadBasic.yan;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @author yyh
 * @create 2020-11-05 12:21
 */
public class PersonTest {

    public static void main(String[] args) {
        List<Person> list = new ArrayList<>();

        list.add(new Person("大门",12));
        list.add(new Person("大门",21));
        list.add(new Person("大门",15));

        Collections.sort(list,new Comparator<Person>(){

            @Override
            public int compare(Person o1, Person o2) {
                return o1.age - o2.age;
            }
        });

        System.out.println(Math.pow(10, 2));

        System.out.println(list);
    }
}
